import Vue from 'vue'
import Router from 'vue-router'

// 一级路由
import Home from './../pages/home/home'
import Login from './../pages/login/login'


//二级路由
  import Welcome from './../pages/welcome/welcome'
  import Data from './../pages/data/index'; //数据统计页面
  // 用户管理
  import Customer from './../pages/customer/customer';//用户列表
  import Customer_vip from './../pages/customer/customer_vip';//vip用户
  import Customer_detail from './../pages/customer/customer_detail';//用户详情
  import Customer_detail_person from './../pages/customer/customer_detail_person';//个人信息
  import Customer_detail_company from './../pages/customer/customer_detail_company';//单位信息
  import Expert from './../pages/customer/expert';//专家列表
  import Expert_editor from './../pages/customer/expert_editor';//专家编辑
  import Expert_comment from './../pages/customer/expert_comment';//专家》官方评论
  import AuthRule from './../pages/customer/authRule';//认证规则
  import Agreement from './../pages/customer/agreement';//用户协议
  import Statement from './../pages/customer/statement';//服务条款
  import Customer_group from './../pages/customer/customer_group'; //组管理
  import Group_Members from './../pages/customer/group_members'; //组成员

  //服务管理
  import Demand from './../pages/demand/demand';//服务列表
  import Demand_type from './../pages/demand/demand_type';//服务类型
  import Demand_reception from './../pages/demand/demand_reception';//对接方
  import Demand_comment from './../pages/demand/demand_comment'; //评论管理
  import Demand_docking from './../pages/demand/demand_docking'; //对接列表

  //资讯管理
  import Consultation_list from './../pages/consultation/consultation_list';//咨询列表
  import Consultation_editor from './../pages/consultation/consultation_editor';//咨询编辑
  import Consultation_type from './../pages/consultation/consultation_type';//咨询类型
  import Consultation_comment from './../pages/consultation/consultation_comment';//咨询评论

  //单位管理
  import Official_company from './../pages/vipCompany/official_company';//官方单位
  import VipCompany_apply from './../pages/vipCompany/vipCompany_apply';//单位入驻申请
  import VipCompany_list from './../pages/vipCompany/vipCompany_list';//会员单位列表
  import VipCompany_editor from './../pages/vipCompany/vipCompany_editor';//会员单位编辑
  import VipCompany_comment from './../pages/vipCompany/vipCompany_comment';//会员单位评论
  import VipCompany_staff from './../pages/vipCompany/vipCompany_staff';//会员单位员工
  import VipCompany_admin from './../pages/vipCompany/vipCompany_admin';//会员单位管理员
  import VipCompany_receipt from '../pages/vipCompany/vipCompany_receipt'; //会员单位发票记录
  import vipCompany_staff_examine from '../pages/vipCompany/vipCompany_staff_examine'; //会员单位员工审核

  import AuthCompany_list from './../pages/vipCompany/authCompany_list';//认证单位
  import AuthCompany_editor from './../pages/vipCompany/authCompany_editor';//认证单位编辑
  import AuthCompany_staff from './../pages/vipCompany/authCompany_staff';//认证单位员工
  import AuthCompany_admin from './../pages/vipCompany/authCompany_admin';//认证单位管理员

  import Level_Sort from './../pages/vipCompany/level_sort'; //级别与分类
  import vipCompany_level from './../pages/vipCompany/vipCompany_level/vipCompany_level'; //单位等级
  import vipCompany_sort from './../pages/vipCompany/vipCompany_sort/vipCompany_sort'; //单位分类
  import Receipt_system from './../pages/vipCompany/receipt_system'; //发票管理
  import Receipt_record from './../pages/vipCompany/receipt_record/receipt_record'; //发票记录
  import Receipt_rise from './../pages/vipCompany/receipt_rise/receipt_rise'; //发票抬头

  //认证管理
  import Authentication from './../pages/authentication/authentication';//认证审核
  import Authentication_person from './../pages/authentication/authentication_person';//个人认证
  import Authentication_company from './../pages/authentication/authentication_company';//单位认证
  import Authentication_expert from './../pages/authentication/authentication_expert';//专家认证

  //活动管理
  import Activity from './../pages/activity/activity';//活动列表
  import Activity_owner from './../pages/activity/activity_owner';//活动方
  import Activity_editor from './../pages/activity/activity_editor';//活动编辑
  import Activity_registration_form from './../pages/activity/activity_registration_form';//报名表
  import ActivityStatement from './../pages/activity/statement'; //活动条款

  //消息管理
  import System_msg_editor from './../pages/message/system_msg_editor';//系统消息编辑
  import System_msg_list from './../pages/message/system_msg_list';//系统消息

  //运营管理
  import Set_meal from './../pages/operation/set_meal';//付费套餐
  import Meal_bind from './../pages/operation/meal_bind';//套餐绑定会员单位
  import User_right from './../pages/operation/user_right';//用户权益
  import Comment_Manage from './../pages/operation/comment_manage'; //评论管理



  //系统管理
  import Administrator from './../pages/system/administrator';//管理员
  import Character from './../pages/system/character';//角色权限
  import AboutUs from './../pages/system/aboutUs';//关于我们
  import Banner from './../pages/system/banner';//轮播图管理
  import Banner_homepage from './../pages/system/banner_homepage/banner_homepage';//首页轮播图管理
  import Banner_subject from './../pages/system/banner_subject/banner_subject';//栏目轮播图管理

  //账号管理
  import Account from './../pages/account/account';//账号管理


Vue.use(Router)

export default new Router({
  routes: [
    {
      path:'/login',
      component: Login,
      name: 'Login',
      meta:{
        name:'登录'
      }
    },
    {
      path: '/',
      redirect:'/Welcome'
    },
    {
      path:'/home',
      component: Home,
      name: 'Home',
      redirect:'/Welcome',
      meta:{
        title:'首页',
        farther_id:'0'
      },
      children:[
        {
          path: '/welcome',
          component: Welcome,
          name: 'Welcome',
        },
        {
          path: '/data',
          component: Data,
          name: 'Data',
          meta:{
            title:'数据统计'
          }
        },
        {
          path: '/customer',
          component: Customer,
          name: 'Customer',
          meta:{
            farther_id:'0',//父级菜单id
            id:'1',//子级菜单id
            farther_title:'用户管理',
            title:'用户列表'
          }
        },
        {
          path: '/customer_detail',
          component: Customer_detail,
          name: 'Customer_detail',
          meta:{
            farther_id:'1',
            id:'1-1',
            farther_title:'用户列表',
            title:'用户详情'
          },
          children:[
            {
              path: '/customer_detail_person',
              component: Customer_detail_person,
              name: 'Customer_detail_person'

            },
            {
              path: '/customer_detail_company',
              component: Customer_detail_company,
              name: 'Customer_detail_company'
            }
          ]
        },
        {
          path: '/customer_vip',
          component: Customer_vip,
          name: 'Customer_vip',
          meta:{
            farther_id:'0',
            id:'2',
            farther_title:'用户管理',
            title:'VIP用户'
          }
        },

        {
          path: '/expert',
          component: Expert,
          name: 'Expert',
          meta:{
            farther_id:'0',
            id:'3',
            farther_title:'用户管理',
            title:'专家库'
          }
        },
        {
          path: '/expert_editor',
          component: Expert_editor,
          name: 'Expert_editor',
          meta:{
            farther_id:'3',
            id:'3-1',
            farther_title:'专家库',
            title:'编辑'
          }
        },
        {
          path: '/expert_comment',
          component: Expert_comment,
          name: 'Expert_comment',
          meta:{
            farther_id:'3',
            id:'3-1',
            farther_title:'专家库',
            title:'评论'
          }
        },
        {
          path: '/authRule',
          component: AuthRule,
          name: 'AuthRule',
          meta:{
            farther_id:'0',
            id:'4',
            farther_title:'用户管理',
            title:'认证规则及权益'
          }
        },
        {
          path: '/agreement',
          component: Agreement,
          name: 'Agreement',
          meta:{
            farther_id:'0',
            id:'5',
            farther_title:'用户管理',
            title:'用户协议'
          }
        },
        {
          path: '/statement',
          component: Statement,
          name: 'Statement',
          meta:{
            farther_id:'0',
            id:'6',
            farther_title:'用户管理',
            title:'服务条款'
          }
        },
        {
          path: '/demand',
          component: Demand,
          name: 'Demand',
          meta:{
            farther_id:'0',
            id:'7',
            farther_title:'服务管理',
            title:'服务列表'
          }
        },
        {
          path: '/demand_docking',
          component: Demand_docking,
          name: 'Demand_docking',
          meta:{
            farther_id:'0',
            id:'7',
            farther_title:'服务管理',
            title:'对接列表'
          }
        },
        {
          path: '/demand_reception',
          component: Demand_reception,
          name: 'Demand_reception',
          meta:{
            farther_id:'7',
            id:'7-1',
            farther_title:'服务列表',
            title:'对接方'
          }
        },
        {
          path: '/demand_comment',
          component: Demand_comment,
          name: 'Demand_comment',
          meta:{
            farther_id:'7',
            id:'7-2',
            farther_title:'服务列表',
            title:'评论管理'
          }
        },
        {
          path: '/demand_type',
          component: Demand_type,
          name: 'Demand_type',
          meta:{
            farther_id:'0',
            id:'8',
            farther_title:'服务管理',
            title:'服务类型'
          }
        },
        {
          path: '/consultation_list',
          component: Consultation_list,
          name: 'Consultation_list',
          meta:{
            farther_id:'0',
            id:'9',
            farther_title:'资讯管理',
            title:'资讯列表'
          }
        },


        {
          path: '/consultation_editor',
          component: Consultation_editor,
          name: 'Consultation_editor',
          meta:{
            farther_id:'9',
            id:'9-1',
            farther_title:'资讯管理',
            title:'编辑'
          }
        },

        {
          path: '/consultation_comment',
          component: Consultation_comment,
          name: 'Consultation_comment',
          meta:{
            farther_id:'9',
            id:'9-2',
            farther_title:'资讯管理',
            title:'管理评论'
          }
        },
        {
          path: '/consultation_type',
          component: Consultation_type,
          name: 'Consultation_type',
          meta:{
            farther_id:'0',
            id:'10',
            farther_title:'资讯管理',
            title:'资讯类型管理'
          }
        },
        {
          path: '/vipCompany_list',
          component: VipCompany_list,
          name: 'VipCompany_list',
          meta:{
            farther_id:'0',
            id:'11',
            farther_title:'单位管理',
            title:'会员单位'
          }
        },
        {
          path: '/vipCompany_editor',
          component: VipCompany_editor,
          name: 'VipCompany_editor',
          meta:{
            farther_id:'11',
            id:'11-1',
            farther_title:'会员单位',
            title:'编辑'
          }
        },
        {
          path: '/vipCompany_comment',
          component: VipCompany_comment,
          name: 'VipCompany_comment',
          meta:{
            farther_id:'11',
            id:'11-2',
            farther_title:'会员单位',
            title:'官方点评'
          }
        },
        {
          path: '/vipCompany_staff',
          component: VipCompany_staff,
          name: 'VipCompany_staff',
          meta:{
            farther_id:'11',
            id:'11-3',
            farther_title:'会员单位',
            title:'员工表'
          }
        },
        {
          path: '/vipCompany_admin',
          component: VipCompany_admin,
          name: 'VipCompany_admin',
          meta:{
            farther_id:'11',
            id:'11-4',
            farther_title:'会员单位',
            title:'设置管理员'
          }
        },
        {
          path: '/VipCompany_receipt',
          component: VipCompany_receipt,
          name: 'VipCompany_receipt',
          meta:{
            farther_id:'11',
            id:'11-5',
            farther_title:'会员单位',
            title:'发票记录'
          }
        },
        {
          path: '/vipCompany_staff_examine',
          component: vipCompany_staff_examine,
          name: 'vipCompany_staff_examine',
          meta:{
            farther_id:'11',
            id:'11-6',
            farther_title:'会员单位',
            title:'员工审核'
          }
        },
        {
          path: '/AuthCompany_list',
          component: AuthCompany_list,
          name: 'AuthCompany_list',
          meta:{
            farther_id:'0',
            id:'12',
            farther_title:'单位管理',
            title:'认证单位'
          }
        },
        {
          path: '/AuthCompany_editor',
          component: AuthCompany_editor,
          name: 'AuthCompany_editor',
          meta:{
            farther_id:'12',
            id:'12-1',
            farther_title:'认证单位',
            title:'编辑'
          }
        },
        {
          path: '/AuthCompany_staff',
          component: AuthCompany_staff,
          name: 'AuthCompany_staff',
          meta:{
            farther_id:'12',
            id:'12-2',
            farther_title:'认证单位',
            title:'员工表'
          }
        },
        {
          path: '/AuthCompany_admin',
          component: AuthCompany_admin,
          name: 'AuthCompany_admin',
          meta:{
            farther_id:'12',
            id:'12-3',
            farther_title:'认证单位',
            title:'管理员'
          }
        },

        {
          path: '/official_company',
          component: Official_company,
          name: 'Official_company',
          meta:{
            farther_id:'0',
            id:'13',
            farther_title:'单位管理',
            title:'官方单位'
          }
        },
        {
          path: '/vipCompany_apply',
          component: VipCompany_apply,
          name: 'VipCompany_apply',
          meta:{
            farther_id:'0',
            id:'14',
            farther_title:'单位管理',
            title:'入驻审核'
          }
        },
        {
          path: '/level_Sort',
          component: Level_Sort,
          name: 'level_Sort',
          meta:{
            farther_id:'0',
            id:'15',
            farther_title:'单位管理',
            title:'级别与分类'
          },
          redirect:'/vipCompany_level',
          children:[
            {
              path: '/vipCompany_level',
              component: vipCompany_level,
              name: 'vipCompany_level'
            },
            {
              path: '/vipCompany_sort',
              component: vipCompany_sort,
              name: 'vipCompany_sort'
            }
          ]
        },
        {
          path: '/receipt_system',
          component: Receipt_system,
          name: 'receipt_system',
          meta:{
            farther_id:'0',
            id:'16',
            farther_title:'单位管理',
            title:'发票管理'
          },
          // redirect:'/receipt_record',
          children:[
            {
              path: '/receipt_record',
              component: Receipt_record,
              name: 'receipt_record'
            },
            {
              path: '/receipt_rise',
              component: Receipt_rise,
              name: 'receipt_rise'
            }
          ]
        },
        {
          path: '/authentication',
          component: Authentication,
          name: 'Authentication',
          meta:{
            farther_id:'0',
            id:'17',
            farther_title:'用户管理',
            title:'认证审核'
          },
          children:[
            {
              path: '/authentication_person',
              component: Authentication_person,
              name: 'authentication_person'

            },
            {
              path: '/authentication_company',
              component: Authentication_company,
              name: 'authentication_company'
            },
            {
              path: '/authentication_expert',
              component: Authentication_expert,
              name: 'authentication_expert'
            }
          ]
        },
        {
          path: '/activity',
          component: Activity,
          name: 'Activity',
          meta:{
            farther_id:'0',
            id:'18',
            farther_title:'活动管理',
            title:'活动列表'
          }
        },
        {
          path: '/ActivityStatement',
          component: ActivityStatement,
          name: 'ActivityStatement',
          meta:{
            farther_id:'0',
            id:'31',
            farther_title:'活动管理',
            title:'活动条款'
          }
        },
        {
          path: '/activity_editor',
          component: Activity_editor,
          name: 'Activity_editor',
          meta:{
            farther_id:'18',
            id:'18-1',
            farther_title:'活动列表',
            title:'活动编辑'
          },
        },
        {
          path: '/activity_registration_form',
          component: Activity_registration_form,
          name: 'Activity_registration_form',
          meta:{
            farther_id:'18',
            id:'18-2',
            farther_title:'活动列表',
            title:'报名表'
          },
        },
        {
          path: '/activity_owner',
          component: Activity_owner,
          name: 'Activity_owner',
          meta:{
            farther_id:'0',
            id:'19',
            farther_title:'活动管理',
            title:'活动方'
          }
        },
        {
          path: '/set_meal',
          component: Set_meal,
          name: 'Set_meal',
          meta:{
            farther_id:'0',
            id:'20',
            farther_title:'运营管理',
            title:'付费套餐'
          }
        },
        {
          path: '/meal_bind',
          component: Meal_bind,
          name: 'Meal_bind',
          meta:{
            farther_id:'0',
            id:'21',
            farther_title:'运营管理',
            title:'付费套餐'
          }
        },
        {
          path: '/user_right',
          component: User_right,
          name: 'User_right',
          meta:{
            farther_id:'0',
            id:'22',
            farther_title:'运营管理',
            title:'用户权益'
          }
        },

        {
          path: '/system_msg_list',
          component: System_msg_list,
          name: 'System_msg_list',
          meta:{
            farther_id:'0',
            id:'23',
            farther_title:'系统管理',
            title:'系统消息'
          }
        },
        {
          path: '/system_msg_editor',
          component: System_msg_editor,
          name: 'System_msg_editor',
          meta:{
            farther_id:'23',
            id:'23-1',
            farther_title:'系统消息',
            title:'编辑'
          }
        },
        {
          path: '/administrator',
          component: Administrator,
          name: 'Administrator',
          meta:{
            farther_id:'0',
            id:'24',
            farther_title:'系统管理',
            title:'管理员'
          }
        },
        {
          path: '/character',
          component: Character,
          name: 'Character',
          meta:{
            farther_id:'0',
            id:'25',
            farther_title:'系统管理',
            title:'角色权限'
          }
        },
        {
          path:'/banner',
          component:Banner,
          name:'Banner',
          meta:{
            farther_id:'0',
            id:'26',
            farther_title:'系统管理',
            title:'轮播图及栏目'
          },
          // redirect:'/banner_homepage',
          children:[
            {
              path: '/banner_homepage',
              component: Banner_homepage,
              name: 'Banner_homepage',
              meta:{
                farther_id:'26',
              }
            },
            {
              path: '/banner_subject',
              component: Banner_subject,
              name: 'Banner_subject',
              meta:{
                farther_id:'26',
              }
            }
          ]
        },
        // {
        //   path:'/banner_homepage',
        //   component:Banner_homepage,
        //   name:'Banner_homepage',
        //   meta:{
        //     farther_id:'26',
        //     id:'26-1',
        //     farther_title:'轮播图及栏目',
        //     title:'轮播图'
        //   }
        // },
        // {
        //   path:'/banner_subject',
        //   component:Banner_subject,
        //   name:'Banner_subject',
        //   meta:{
        //     farther_id:'26',
        //     id:'26-2',
        //     farther_title:'轮播图及栏目',
        //     title:'栏目'
        //   }
        // },
        {
          path:'/aboutUs',
          component:AboutUs,
          name:'AboutUs',
          meta:{
            farther_id:'0',
            id:'27',
            farther_title:'系统管理',
            title:'关于我们'
          }
        },
        {
          path:'/account',
          component:Account,
          name:'Account',
          meta:{
            farther_id:'0',
            id:'28',
            farther_title:'账号管理',
            title:'我的账号'
          }
        },
        {
          path:'/customer_group',
          component:Customer_group,
          name:'customer_group',
          meta:{
            farther_id:'0',
            id:'29',
            farther_title:'用户管理',
            title:'组管理'
          }
        },
        {
          path:'/group_members',
          component:Group_Members,
          name:'Group_Members',
          meta:{
            farther_id:'29',
            id:'29-1',
            farther_title:'组管理',
            title:'组成员'
          }
        },
        {
          path:'/comment_manage',
          component:Comment_Manage,
          name:'comment_manage',
          meta:{
            farther_id:'0',
            id:'30',
            farther_title:'运营管理',
            title:'管理评论'
          }
        }
      ],
    }
  ]
})
